.page-content {
    .literal-block-wrapper {
        margin: 1.5rem 0;
    }

    .highlight {
        position: relative;
        pre {
            font-family: $code_font_family;
            padding: 1rem;
            overflow: auto;
            overflow-y: hidden;
            margin-top: 0!important;
        }
    }
    
    .code, code:not(.download) {
        margin: 0 4px;
        padding: 0 4px;
        background: $code_background;
        font-family: $code_font_family;
        border-radius: 2px;
        span.pre {
            font-family: $code_font_family;
        }
    }
    
    pre {
        background: rgba(0, 0, 0, 0.05);
        color: #455A64;
        padding: 16px 32px;
        width: auto;
        border-radius: 4px;
        white-space: pre;
        word-wrap: break-word;

        &:hover {
            @extend .mdl-shadow--2dp;

            &:before {
                font-family: $body_font_family;
                padding: 0 0.5rem;
                content: attr(click-to-copy);
                color: rgba(0, 0, 0, 0.5);
                border-radius: 4px;
                position: absolute;
                float: right;
                top: 0.5rem;
                right: 0.5rem;
                background: rgb(200, 200, 200);
                font-size: 0.8rem;
                cursor: pointer;
            }
        }
    }
}

/*
 * Inline code block
 */
 cite {
    background: rgba(27,31,35,.05);
    padding: .2em .4em;
    border-radius: 6px;
    font-style: normal;
    font-size: 85%;
    font-family: $code_font_family;
    white-space: nowrap;
}

/*
 * Code block caption
*/
.code-block-caption {
    font-weight: bold;
    margin-top: 16px;
    padding: 12px 16px;
    background: #1c313a;
    border-radius: 4px 4px 0 0;
    border-collapse: collapse;
    color: white;

    .headerlink {
        visibility: hidden;
        text-decoration: none;
        &:after {
            color: white;
            content: "¶";
            font-size: 1rem;
        }
    }

    &:hover .headerlink:after {
        visibility: visible;
        animation: float-in 0.2s $animation-curve-fast-out-slow-in 0s forwards;
    }
}

/*
 * Code block with line numbers (sphinx uses table to arrange them)
*/
table.highlighttable {
    margin: 0!important;
    width: 100%;

    td.linenos {
        text-align: center !important;
        width: 44px;
        padding: 0 !important;
        vertical-align: top;

        div {
            height: 100%;
            width: 100%;
            position: absolute;
            top: 0%;

            pointer-events: none;

            pre {
                background: white;
                margin: 0;
                padding: 24px 0px !important;

                height: calc(100% - 48px);
            }
        }
    }

    td.code {
        padding: 0 !important;

        div > pre {
            margin: 0;
            padding: 24px;
        }
    }
}